home *** CD-ROM | disk | FTP | other *** search
/ PC to Maximum / PC-na-maximum.bin / CPUSpeed / CPU Speed.cpp next >
Encoding:
C/C++ Source or Header  |  2000-03-27  |  398 b   |  21 lines

  1. // CPU Speed.cpp : Defines the entry point for the application.
  2. //
  3.  
  4. #include "stdafx.h"
  5.  
  6.  
  7. int MyWinMain(void)
  8. {
  9.     CTimer timer;
  10.     TCHAR mess[30];
  11.     timer.Start();
  12.     Sleep(1000); 
  13.     unsigned cpuspeed10 = (unsigned)(timer.Stop()/100000);
  14.     wsprintf(mess, (char *)("CPU speed %d.%d mhz\n"), cpuspeed10 / 10, cpuspeed10 % 10);
  15.     MessageBox(NULL, mess, "CPU Speed", MB_OK);
  16.     return 0;
  17. }
  18.  
  19.  
  20.  
  21.